package com.baizhi.controller;

import com.baizhi.service.PlayedService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RefreshScope
@RestController
@RequestMapping
public class PlayedController {

    @Autowired
    private PlayedService playedService;

    @PostMapping("/user/played/insert")
    public void addPlayed(@RequestParam("uid") Integer uid, @RequestParam("videoId") Integer videoId) {
        playedService.add(uid, videoId);
    }
}
